package com.gitee.wsl.ext.collection

 fun <T> Collection<T>.containsAny(elements: Iterable<T>): Boolean =
    elements.any { contains(it) }

 fun <T> Iterable<T>.containsAny(vararg elements: T): Boolean =
    elements.any { contains(it) }

fun <T> Collection<T>.containsAll(vararg list: T) = containsAll(list.toList())


/**
 * Returns true if the Interval contains all the specified int values.
 */
fun<T> Iterable<T>.containsAll(vararg values: T): Boolean  {
    for (value in values) {
        if (!this.contains(value)) {
            return false
        }
    }
    return true
}